<?php
/*
    Copyright (C) 2008 - 2010 Inanta Martsanto
    
    This file is part of Koma.

    Koma is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Koma is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Koma.  If not, see <http://www.gnu.org/licenses/>.
    
    Inanta Martsanto (inanta@inationsoft.com)
*/

include('mainfile.php');

if(!$komaUserHandler->isAdmin())
{
    redirect(KOMA_URL, T_('You have no permission to access this area'));
}

if (!headers_sent())
{
    header('Content-Type:text/html; charset='.KOMA_CHARSET);
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    header('Pragma: no-cache');
}

$result = $komaDB->query("SELECT * FROM ".$komaDB->prefix('components')." WHERE hasadmin = 1");

while($row = $komaDB->fetchArray($result))
{
    $contents .= $row['dirname'];
}

require('presentation.php');
?>